<%--
  Created by IntelliJ IDEA.
  User: YinMai
  Date: 2022/9/2
  Time: 11:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
    <script>
        $(function () {
            $("#username").blur(
                function () {
                    $.ajax({
                        url:"${pageContext.request.contextPath}/check",
                        type:"POST",
                        data: $("#username").val(),
                        dataType:"json",
                        contentType:"application/json;charset=UTF-8",
                        success:function (data) {
                          alert(data);
                        }
                    });
                }
            );
        });
    </script>
</head>
<body>

<h1>INDEX</h1>
<%-- <jsp:forward page="test.html"/>--%>
<input type="text" id="username">
</body>
</html>
